<?php
/*
 * Validate
 */
function is_email($email){
	$regexp = "^[a-zA-Z0-9\-_\.]+\@[a-zA-Z0-9_\.\-]+(\.)(com|net|cn|cc|ch|jp|kr|tw|hk|sg|my)$";
	return eregi($regexp, $email);
}
function is_chinese($str){
	return (preg_match("/^[".chr(0xa1)."-".chr(0xff)."]+$/", utf8_to_gbk($str)));
}
?>
